package com.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class SelleractivityrecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public SelleractivityrecordExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andSaridIsNull() {
            addCriterion("SARid is null");
            return (Criteria) this;
        }

        public Criteria andSaridIsNotNull() {
            addCriterion("SARid is not null");
            return (Criteria) this;
        }

        public Criteria andSaridEqualTo(Integer value) {
            addCriterion("SARid =", value, "sarid");
            return (Criteria) this;
        }

        public Criteria andSaridNotEqualTo(Integer value) {
            addCriterion("SARid <>", value, "sarid");
            return (Criteria) this;
        }

        public Criteria andSaridGreaterThan(Integer value) {
            addCriterion("SARid >", value, "sarid");
            return (Criteria) this;
        }

        public Criteria andSaridGreaterThanOrEqualTo(Integer value) {
            addCriterion("SARid >=", value, "sarid");
            return (Criteria) this;
        }

        public Criteria andSaridLessThan(Integer value) {
            addCriterion("SARid <", value, "sarid");
            return (Criteria) this;
        }

        public Criteria andSaridLessThanOrEqualTo(Integer value) {
            addCriterion("SARid <=", value, "sarid");
            return (Criteria) this;
        }

        public Criteria andSaridIn(List<Integer> values) {
            addCriterion("SARid in", values, "sarid");
            return (Criteria) this;
        }

        public Criteria andSaridNotIn(List<Integer> values) {
            addCriterion("SARid not in", values, "sarid");
            return (Criteria) this;
        }

        public Criteria andSaridBetween(Integer value1, Integer value2) {
            addCriterion("SARid between", value1, value2, "sarid");
            return (Criteria) this;
        }

        public Criteria andSaridNotBetween(Integer value1, Integer value2) {
            addCriterion("SARid not between", value1, value2, "sarid");
            return (Criteria) this;
        }

        public Criteria andAtidIsNull() {
            addCriterion("ATid is null");
            return (Criteria) this;
        }

        public Criteria andAtidIsNotNull() {
            addCriterion("ATid is not null");
            return (Criteria) this;
        }

        public Criteria andAtidEqualTo(Integer value) {
            addCriterion("ATid =", value, "atid");
            return (Criteria) this;
        }

        public Criteria andAtidNotEqualTo(Integer value) {
            addCriterion("ATid <>", value, "atid");
            return (Criteria) this;
        }

        public Criteria andAtidGreaterThan(Integer value) {
            addCriterion("ATid >", value, "atid");
            return (Criteria) this;
        }

        public Criteria andAtidGreaterThanOrEqualTo(Integer value) {
            addCriterion("ATid >=", value, "atid");
            return (Criteria) this;
        }

        public Criteria andAtidLessThan(Integer value) {
            addCriterion("ATid <", value, "atid");
            return (Criteria) this;
        }

        public Criteria andAtidLessThanOrEqualTo(Integer value) {
            addCriterion("ATid <=", value, "atid");
            return (Criteria) this;
        }

        public Criteria andAtidIn(List<Integer> values) {
            addCriterion("ATid in", values, "atid");
            return (Criteria) this;
        }

        public Criteria andAtidNotIn(List<Integer> values) {
            addCriterion("ATid not in", values, "atid");
            return (Criteria) this;
        }

        public Criteria andAtidBetween(Integer value1, Integer value2) {
            addCriterion("ATid between", value1, value2, "atid");
            return (Criteria) this;
        }

        public Criteria andAtidNotBetween(Integer value1, Integer value2) {
            addCriterion("ATid not between", value1, value2, "atid");
            return (Criteria) this;
        }

        public Criteria andSidIsNull() {
            addCriterion("Sid is null");
            return (Criteria) this;
        }

        public Criteria andSidIsNotNull() {
            addCriterion("Sid is not null");
            return (Criteria) this;
        }

        public Criteria andSidEqualTo(Integer value) {
            addCriterion("Sid =", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotEqualTo(Integer value) {
            addCriterion("Sid <>", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidGreaterThan(Integer value) {
            addCriterion("Sid >", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidGreaterThanOrEqualTo(Integer value) {
            addCriterion("Sid >=", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidLessThan(Integer value) {
            addCriterion("Sid <", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidLessThanOrEqualTo(Integer value) {
            addCriterion("Sid <=", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidIn(List<Integer> values) {
            addCriterion("Sid in", values, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotIn(List<Integer> values) {
            addCriterion("Sid not in", values, "sid");
            return (Criteria) this;
        }

        public Criteria andSidBetween(Integer value1, Integer value2) {
            addCriterion("Sid between", value1, value2, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotBetween(Integer value1, Integer value2) {
            addCriterion("Sid not between", value1, value2, "sid");
            return (Criteria) this;
        }

        public Criteria andSastartdateIsNull() {
            addCriterion("SAstartDate is null");
            return (Criteria) this;
        }

        public Criteria andSastartdateIsNotNull() {
            addCriterion("SAstartDate is not null");
            return (Criteria) this;
        }

        public Criteria andSastartdateEqualTo(Date value) {
            addCriterionForJDBCDate("SAstartDate =", value, "sastartdate");
            return (Criteria) this;
        }

        public Criteria andSastartdateNotEqualTo(Date value) {
            addCriterionForJDBCDate("SAstartDate <>", value, "sastartdate");
            return (Criteria) this;
        }

        public Criteria andSastartdateGreaterThan(Date value) {
            addCriterionForJDBCDate("SAstartDate >", value, "sastartdate");
            return (Criteria) this;
        }

        public Criteria andSastartdateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("SAstartDate >=", value, "sastartdate");
            return (Criteria) this;
        }

        public Criteria andSastartdateLessThan(Date value) {
            addCriterionForJDBCDate("SAstartDate <", value, "sastartdate");
            return (Criteria) this;
        }

        public Criteria andSastartdateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("SAstartDate <=", value, "sastartdate");
            return (Criteria) this;
        }

        public Criteria andSastartdateIn(List<Date> values) {
            addCriterionForJDBCDate("SAstartDate in", values, "sastartdate");
            return (Criteria) this;
        }

        public Criteria andSastartdateNotIn(List<Date> values) {
            addCriterionForJDBCDate("SAstartDate not in", values, "sastartdate");
            return (Criteria) this;
        }

        public Criteria andSastartdateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("SAstartDate between", value1, value2, "sastartdate");
            return (Criteria) this;
        }

        public Criteria andSastartdateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("SAstartDate not between", value1, value2, "sastartdate");
            return (Criteria) this;
        }

        public Criteria andSaenddateIsNull() {
            addCriterion("SAendDate is null");
            return (Criteria) this;
        }

        public Criteria andSaenddateIsNotNull() {
            addCriterion("SAendDate is not null");
            return (Criteria) this;
        }

        public Criteria andSaenddateEqualTo(Date value) {
            addCriterionForJDBCDate("SAendDate =", value, "saenddate");
            return (Criteria) this;
        }

        public Criteria andSaenddateNotEqualTo(Date value) {
            addCriterionForJDBCDate("SAendDate <>", value, "saenddate");
            return (Criteria) this;
        }

        public Criteria andSaenddateGreaterThan(Date value) {
            addCriterionForJDBCDate("SAendDate >", value, "saenddate");
            return (Criteria) this;
        }

        public Criteria andSaenddateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("SAendDate >=", value, "saenddate");
            return (Criteria) this;
        }

        public Criteria andSaenddateLessThan(Date value) {
            addCriterionForJDBCDate("SAendDate <", value, "saenddate");
            return (Criteria) this;
        }

        public Criteria andSaenddateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("SAendDate <=", value, "saenddate");
            return (Criteria) this;
        }

        public Criteria andSaenddateIn(List<Date> values) {
            addCriterionForJDBCDate("SAendDate in", values, "saenddate");
            return (Criteria) this;
        }

        public Criteria andSaenddateNotIn(List<Date> values) {
            addCriterionForJDBCDate("SAendDate not in", values, "saenddate");
            return (Criteria) this;
        }

        public Criteria andSaenddateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("SAendDate between", value1, value2, "saenddate");
            return (Criteria) this;
        }

        public Criteria andSaenddateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("SAendDate not between", value1, value2, "saenddate");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitIsNull() {
            addCriterion("SACurrentProfit is null");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitIsNotNull() {
            addCriterion("SACurrentProfit is not null");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitEqualTo(Integer value) {
            addCriterion("SACurrentProfit =", value, "sacurrentprofit");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitNotEqualTo(Integer value) {
            addCriterion("SACurrentProfit <>", value, "sacurrentprofit");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitGreaterThan(Integer value) {
            addCriterion("SACurrentProfit >", value, "sacurrentprofit");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitGreaterThanOrEqualTo(Integer value) {
            addCriterion("SACurrentProfit >=", value, "sacurrentprofit");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitLessThan(Integer value) {
            addCriterion("SACurrentProfit <", value, "sacurrentprofit");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitLessThanOrEqualTo(Integer value) {
            addCriterion("SACurrentProfit <=", value, "sacurrentprofit");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitIn(List<Integer> values) {
            addCriterion("SACurrentProfit in", values, "sacurrentprofit");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitNotIn(List<Integer> values) {
            addCriterion("SACurrentProfit not in", values, "sacurrentprofit");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitBetween(Integer value1, Integer value2) {
            addCriterion("SACurrentProfit between", value1, value2, "sacurrentprofit");
            return (Criteria) this;
        }

        public Criteria andSacurrentprofitNotBetween(Integer value1, Integer value2) {
            addCriterion("SACurrentProfit not between", value1, value2, "sacurrentprofit");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitIsNull() {
            addCriterion("SATotalProfit is null");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitIsNotNull() {
            addCriterion("SATotalProfit is not null");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitEqualTo(Integer value) {
            addCriterion("SATotalProfit =", value, "satotalprofit");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitNotEqualTo(Integer value) {
            addCriterion("SATotalProfit <>", value, "satotalprofit");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitGreaterThan(Integer value) {
            addCriterion("SATotalProfit >", value, "satotalprofit");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitGreaterThanOrEqualTo(Integer value) {
            addCriterion("SATotalProfit >=", value, "satotalprofit");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitLessThan(Integer value) {
            addCriterion("SATotalProfit <", value, "satotalprofit");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitLessThanOrEqualTo(Integer value) {
            addCriterion("SATotalProfit <=", value, "satotalprofit");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitIn(List<Integer> values) {
            addCriterion("SATotalProfit in", values, "satotalprofit");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitNotIn(List<Integer> values) {
            addCriterion("SATotalProfit not in", values, "satotalprofit");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitBetween(Integer value1, Integer value2) {
            addCriterion("SATotalProfit between", value1, value2, "satotalprofit");
            return (Criteria) this;
        }

        public Criteria andSatotalprofitNotBetween(Integer value1, Integer value2) {
            addCriterion("SATotalProfit not between", value1, value2, "satotalprofit");
            return (Criteria) this;
        }

        public Criteria andSaimageIsNull() {
            addCriterion("SAimage is null");
            return (Criteria) this;
        }

        public Criteria andSaimageIsNotNull() {
            addCriterion("SAimage is not null");
            return (Criteria) this;
        }

        public Criteria andSaimageEqualTo(String value) {
            addCriterion("SAimage =", value, "saimage");
            return (Criteria) this;
        }

        public Criteria andSaimageNotEqualTo(String value) {
            addCriterion("SAimage <>", value, "saimage");
            return (Criteria) this;
        }

        public Criteria andSaimageGreaterThan(String value) {
            addCriterion("SAimage >", value, "saimage");
            return (Criteria) this;
        }

        public Criteria andSaimageGreaterThanOrEqualTo(String value) {
            addCriterion("SAimage >=", value, "saimage");
            return (Criteria) this;
        }

        public Criteria andSaimageLessThan(String value) {
            addCriterion("SAimage <", value, "saimage");
            return (Criteria) this;
        }

        public Criteria andSaimageLessThanOrEqualTo(String value) {
            addCriterion("SAimage <=", value, "saimage");
            return (Criteria) this;
        }

        public Criteria andSaimageLike(String value) {
            addCriterion("SAimage like", value, "saimage");
            return (Criteria) this;
        }

        public Criteria andSaimageNotLike(String value) {
            addCriterion("SAimage not like", value, "saimage");
            return (Criteria) this;
        }

        public Criteria andSaimageIn(List<String> values) {
            addCriterion("SAimage in", values, "saimage");
            return (Criteria) this;
        }

        public Criteria andSaimageNotIn(List<String> values) {
            addCriterion("SAimage not in", values, "saimage");
            return (Criteria) this;
        }

        public Criteria andSaimageBetween(String value1, String value2) {
            addCriterion("SAimage between", value1, value2, "saimage");
            return (Criteria) this;
        }

        public Criteria andSaimageNotBetween(String value1, String value2) {
            addCriterion("SAimage not between", value1, value2, "saimage");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}